package com.slz3.business.module.goodsManagement.gooInWarehouse.steward;

import com.slz3.business.module.goodsManagement.gooInWarehouse.domain.GooInWarehouse;
import com.slz3.business.module.goodsManagement.gooInWarehouse.domain.GooInWarehouseCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class GooInWarehouseResponse extends GooInWarehouseResController {

    public Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(GooInWarehouse.class).flatMap(gooInWarehouse ->
                super.add(req, gooInWarehouse)
        );
    }

    public Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.delete(req, gooInWarehouseCondition)
        );
    }

    public Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(GooInWarehouse.class).flatMap(gooInWarehouse ->
                super.modify(req, gooInWarehouse)
        );
    }


    public Mono<ServerResponse> list(ServerRequest req) {
        return super.list(req);
    }

    public Mono<ServerResponse> info(ServerRequest req) {
        return super.info(req);
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        return super.choice(req);
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.auditSubmit(req, gooInWarehouseCondition)
        );
    }

    public Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.audit(req, gooInWarehouseCondition)
        );
    }

    public Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.auditReject(req, gooInWarehouseCondition)
        );
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.usingEnable(req, gooInWarehouseCondition)
        );
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(GooInWarehouseCondition.class).flatMap(gooInWarehouseCondition ->
                super.usingDisable(req, gooInWarehouseCondition)
        );
    }

}
